Remove unused GDK_HINT_POS
authorBenjamin Otte <otte@redhat.com>
Thu, 30 Jul 2020 15:05:23 +0000 (17:05 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 30 Jul 2020 15:06:15 +0000 (17:06 +0200)
gdk/gdkinternals.h
gdk/macos/gdkmacossurface.c
gdk/win32/gdksurface-win32.c
gdk/x11/gdksurface-x11.c
gtk/gtkwindow.c

index 8a51704b414a4aff986c80890b5f6cdefd347b5e..3b5776cbb5c46f587458c0dd84b53af6db804d38 100644 (file)
@@ -296,7 +296,6 @@ GdkGLContext *gdk_surface_get_shared_data_gl_context (GdkSurface *surface);
 
 typedef enum
 {
-  GDK_HINT_POS         = 1 << 0,
   GDK_HINT_MIN_SIZE    = 1 << 1,
   GDK_HINT_MAX_SIZE    = 1 << 2,
 } GdkSurfaceHints;
index 11cd12d6c3dc72fd626a69313935927b92164937..5f719bb92347b01e368b601f7673cf0ea86dd828 100644 (file)
@@ -623,8 +623,6 @@ _gdk_macos_surface_set_geometry_hints (GdkMacosSurface   *self,
   g_return_if_fail (geometry != NULL);
   g_return_if_fail (self->window != NULL);
 
-  if (geom_mask & GDK_HINT_POS) { /* TODO */ }
-
   if (geom_mask & GDK_HINT_MAX_SIZE)
     max_size = NSMakeSize (geometry->max_width, geometry->max_height);
   else
index 74001bf549f9df71f0498acd0ed571d82566a300..a2d69a3b2174af74c01bd25ebd42b5fa0b21224d 100644 (file)
@@ -832,8 +832,6 @@ show_window_internal (GdkSurface *window,
 
   /* For initial map of "normal" windows we want to emulate WM window
    * positioning behaviour, which means:
-   * + Use user specified position if GDK_HINT_POS or GDK_HINT_USER_POS
-   * otherwise:
    * + default to the initial CW_USEDEFAULT placement,
    *   no matter if the user moved the window before showing it.
    * + Certain window types and hints have more elaborate positioning
@@ -841,8 +839,7 @@ show_window_internal (GdkSurface *window,
    */
   surface = GDK_WIN32_SURFACE (window);
   if (!already_mapped &&
-      GDK_IS_TOPLEVEL (window) &&
-      (surface->hint_flags & (GDK_HINT_POS | GDK_HINT_USER_POS)) == 0)
+      GDK_IS_TOPLEVEL (window))
     {
       gboolean center = FALSE;
       RECT window_rect, center_on_rect;
@@ -1419,11 +1416,6 @@ gdk_win32_surface_set_geometry_hints (GdkSurface         *window,
     impl->hint_flags = geom_mask;
   impl->hints = *geometry;
 
-  if (geom_mask & GDK_HINT_POS)
-    {
-      /* even the X11 mplementation doesn't care */
-    }
-
   if (geom_mask & GDK_HINT_MIN_SIZE)
     {
       GDK_NOTE (MISC, g_print ("... MIN_SIZE: %dx%d\n",
index 6da5fdb5886bd416fa01963273ede69cef276775..f55ab5fc9a5f6b234fbe383c2e1dd189b8f418db 100644 (file)
@@ -2150,16 +2150,13 @@ gdk_x11_surface_set_geometry_hints (GdkSurface         *surface,
   
   size_hints.flags = 0;
   
-  if (geom_mask & GDK_HINT_POS)
-    {
-      size_hints.flags |= PPosition;
-      /* We need to initialize the following obsolete fields because KWM 
-       * apparently uses these fields if they are non-zero.
-       * #@#!#!$!.
-       */
-      size_hints.x = 0;
-      size_hints.y = 0;
-    }
+  size_hints.flags |= PPosition;
+  /* We need to initialize the following obsolete fields because KWM 
+   * apparently uses these fields if they are non-zero.
+   * #@#!#!$!.
+   */
+  size_hints.x = 0;
+  size_hints.y = 0;
 
   if (geom_mask & GDK_HINT_MIN_SIZE)
     {
index 8020abe08c119de3bb1173faebb1bdaedba40a1a..fc9723431e2f6b5767b6f9ec3414ac53e4f1d340 100644 (file)
@@ -5452,17 +5452,6 @@ gtk_window_move_resize (GtkWindow *window)
    * this.
    */
 
-  /* Also, if the initial position was explicitly set, then we always
-   * toggle on PPosition. This makes gtk_window_move(window, 0, 0)
-   * work.
-   */
-
-  if (configure_request_pos_changed)
-    {
-      new_flags |= GDK_HINT_POS;
-      hints_changed = TRUE;
-    }
-
   current_width = gdk_surface_get_width (priv->surface);
   current_height = gdk_surface_get_height (priv->surface);
 
@@ -5542,7 +5531,7 @@ gtk_window_move_resize (GtkWindow *window)
 
       return; /* Bail out, we didn't really process the move/resize */
     }
-  else if ((configure_request_size_changed || hints_changed) &&
+  else if ((configure_request_size_changed || hints_changed || configure_request_pos_changed) &&
            (current_width != new_request.width || current_height != new_request.height))
     {
       /* We are in one of the following situations:
@@ -5725,10 +5714,6 @@ gtk_window_compute_hints (GtkWindow   *window,
   else
     gtk_window_guess_default_size (window, &requisition.width, &requisition.height);
 
-  /* We don't want to set GDK_HINT_POS in here, we just set it
-   * in gtk_window_move_resize() when we want the position
-   * honored.
-   */
   *new_flags = 0;
   
   get_shadow_width (window, &shadow);